package cz.data.domain.market.mapping.listener.event;

import cz.data.domain.market.model.entity.DataApiEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

public class ApiReleaseEvent extends ApplicationEvent {
    private final ApiEventType eventType;

    public ApiReleaseEvent(DataApiEntity api, ApiEventType eventType) {
        super(api);
        this.eventType = eventType;
    }

    public DataApiEntity getApi() {
        return (DataApiEntity) getSource();
    }

    public ApiEventType getEventType() {
        return eventType;
    }

}
